Skip to content

1.2.0

Compare
Choose a tag to compare
@gorhill gorhill released this 07 Oct 11:35
· 9047 commits to master since this release

New:

New cosmetic filter to foil specific inline script tags -- one more tool in uBlock Origin's arsenal against bloat. Syntax of this new cosmetic filter is:

example.com##script:contains(...)

Where ... is a plain string or a regular expression. If ... is a string in between / like /.../, the string is treated as a literal javascript regular expression, otherwise it is treated as a plain string.

Caveats of current implementation:

Excellent example of the usefulness of this new cosmetic filter:

  • Enable "DEU: EasyList Germany‎" in 3rd-party filters pane in the dashboard.
  • Go to http://www.focus.de/.
  • See site purposefully defacing itself with obnoxious click-bait ads.
  • Go to My filters pane in the dashboard.
  • Add custom cosmetic filter www.focus.de##script:contains(uabInject).
  • Reload http://www.focus.de/.
  • No more obnoxious click-bait ads.
  • Another example: explosm.net##script:contains(/^__durl=/) for http://explosm.net/.

Blocking inline script tags for that site would prevent site-defacing ads from appearing, but this is a broad approach which can result in other useful functionality on the site being disabled as well. The new script tag cosmetic filter syntax allows a more refined approach by blocking one or more specific inline script tags on a page. Blocking all inline script is preferred if this does not lead to the site losing useful functionalities. But if this happens, a specific script tag filter is the solution.

Full documentation.

Closed as fixed:

Chromium
Firefox
Core